CSCIĀ 0046. System Programming with C

Units: 3
Prerequisite: Completion of CSCI 12 with grade of "C" or better
Advisory: Completion of CSCI 50 with grade of "C" or better
Hours: 72 (54 lecture, 18 laboratory)
Introduction to the C language and system programming on a Unix-like operating system. Topics include the standard C library, memory allocation, file I/O, permissions, system calls, networking, and process management. Development in a Unix environment will cover editors, shell scripting, makefiles, source code control, and debugging. (CSU, UC)

CSCI 0046 - System Programming with C

http://catalog.sierracollege.edu/course-outlines/csci-0046/

Catalog Description DESCRIPTION IS HERE: Prerequisite: Completion of CSCI 12 with grade of "C" or better Advisory: Completion of CSCI 50 with grade of "C" or better Hours: 72 (54 lecture, 18 laboratory) Description: Introduction to the C language and system programming on a Unix-like operating system. Topics include the standard C library, memory allocation, file I/O, permissions, system calls, networking, and process management. Development in a Unix environment will cover editors, shell scripting, makefiles, source code control, and debugging. (CSU, UC) Units 3 Lecture-Discussion 54 Laboratory 18 By Arrangement Contact Hours 72 Outside of Class Hours Course Student Learning Outcomes Use the standard C libraries for input/output, memory management, and networking. Construct multi-file programs using appropriate software engineering tools. Construct programs utilizing arrays, structures, loops, and/or subroutines. Debug and add features to existing programs. Course Content Outline I. Introduction to C A. History B. Characteristics 1. Merits 2. Weaknesses C. UNIX environment D. Files that make up a project 1. Source code 2. Header files 3. Object files 4. Library files 5. Executable files 6. Makefiles II. Fundamentals A. Writing and compiling simple programs B. Comments C. Variables and types D. Standard input/output E. printf/scanf F. Expressions 1. Arithmetic operators 2. Assignment operators 3. Increment and decrement operators III. Control Statements A. Logical expressions B. if/else C. switch D. while, do/while E. for F. Loop control: break, continue IV. Arrays A. One-dimensional B. Multi-dimensional V. Functions A. Defining and calling B. Arguments C. Return values D. Recursion E. Local and global variables VI. Pointers A. Operators: address and indirection B. Pointer arithmetic C. Arrays and pointers D. Pointer arguments VII. Strings A. Standard library: printf, scanf, fgets, puts B. String manipulation: strcpy, strlen, strcat, strcmp VIII. Project organization A. The preprocessor B. #define, #ifdef C. Managing source, header, object, and executable files D. Makefiles IX. Structs and Unions X. Dynamic memory allocation A. malloc, free B. Linked lists C. Pointers to functions XI. Standard libraries A. Math B. Time C. Random XII. Operating system interfaces A. Fork, exec, wait B. Signals C. Socket programming XIII. Development tools A. Debugger B. Source code control Course Objectives Course Objectives Lecture Objectives: 1. Identify the phases of compiling a C program. 2. Interpret a written program specification and decompose it into psuedocode. 3. Analyze the dependency graph for building a multi-file project. Construct a Makefile to automate the build process. 4. Describe the primitive C data types. 5. Interpret documentation of library functions and use the functions in working programs. Laboratory Objectives: Interpret written program specifications and write C programs conforming to the ANSI standard incorporating the following language and library features: 1. Standard I/O using printf, scanf, fputs, and fgets; 2. String manipulation using strcmp, arrays, and pointer arithmetic; 3. Structs and unions; 4. Multiple source and header files; 5. Stream-based and record-based file I/O; 6. Dynamic memory management; 7. Process management system calls including fork, exec, and wait, and their variants; 8. Command-line arguments; 9. Control structures: if/else, while, do/while, for; 10. Functions that accept and return primitive types, arrays, and structs; 11. Standard mathematical functions from the libm library; 12. Client socket programming; 13. Recursive functions. 14. Writing makefiles to automate the compilation process; 15. Coordinating development among two or more persons using a version control system; 16. Compiling and linking programs requiring multiple source files. Methods of Evaluation Classroom Discussions Objective Examinations Problem Solving Examinations Projects Reading Assignments 1. Read the textbook chapter about the primitive data types. Pay attention to how each has a different formatting code in the printf function. Be prepared to discuss in class. 2. Read the description of the programming assignment for this week. Prepare to discuss in class how to decompose the problem into functions and what variables will be needed. Writing, Problem Solving or Performance 1. Write a recursive function to implement the quicksort algorithm. Test your function on integer arrays of size zero, one, two, and ten, and sixteen. 2. Compare and contrast the Java and C programming languages in the following areas: performance, memory usage, portability, ease of readability. Other (Term projects, research papers, portfolios, etc.) Numerous hands-on programming assignments. Methods of Instruction Laboratory Lecture/Discussion Distance Learning Other materials and-or supplies required of students that contribute to the cost of the course.